
/**
 * -----Tag folder-----
 * http://code.google.com/p/tagfolder
 * Licensed under LGPL
 * chuanshenglu@gmail.com
 * xrjieyee@gmail.com
 *
 */
#ifndef __CLIENT_STUB_H__
#define __CLIENT_STUB_H__

#include <windows.h>
#include "TFstd.h"
#include <set>
#include <string>
#include "TFChannel.h"

//=======================================================
//=          Dynamic Library Interface (DLL)
//=          Easy to call from python,c,perl
//=======================================================
#ifdef __cplusplus
extern "C"{
#endif
//Add new tag;
DL_DECL int AddTagA(const char*);
DL_DECL int AddTagW(const wchar_t*);

//Add new link between
DL_DECL int LinkTagToFileA(const char*, const char*);
DL_DECL int LinkTagToFileW(const wchar_t*, const wchar_t*);

#ifdef __cplusplus
}
#endif

//=========================================================
//=           Static Library Interface
//=           Easy to call from CPP
//=========================================================
#ifdef __cplusplus
DL_DECL bool AddTag(const char* tag);
DL_DECL bool AddTag(const wchar_t* tag);
DL_DECL bool AddTag(std::string& tag);
DL_DECL bool AddFile(const char* file);
DL_DECL bool AddFile(const wchar_t* file);
DL_DECL bool AddFile(std::string& file);
DL_DECL bool LinkTagToFile(const char* tag, const char * file);
DL_DECL bool LinkTagToFile(const wchar_t* tag, const wchar_t* file);
DL_DECL bool LinkTagToFile(std::string& tag, std::string& file);

//==========================================
//Interfaces for miscellaneous purpose
//==========================================
DL_DECL std::set < std::string > GetAllTags( );
DL_DECL std::set < std::string > GetTagsOfFile( std::string & file);
DL_DECL std::set < std::string > GetAllFiles( );
DL_DECL std::set < std::string > GetFilesWithTag( std::string & tag);
#endif //__cplusplus

#endif //__CLIENT_STUB_H__
